from flask import Blueprint

# 创建用户端API蓝图
user_api = Blueprint('user_api', __name__)

# 注册子蓝图时直接导入，避免循环导入
def register_blueprints():
    from .venues import venue_bp
    from .activities import activity_bp
    from .orders import order_bp
    from .payments import payment_bp
    from .banners import banner_bp
    from .auth import auth_bp
    from .social import social_bp
    
    user_api.register_blueprint(venue_bp, url_prefix='/venues')
    user_api.register_blueprint(activity_bp, url_prefix='/activities') 
    user_api.register_blueprint(order_bp, url_prefix='/orders')
    user_api.register_blueprint(payment_bp, url_prefix='/payments')
    user_api.register_blueprint(banner_bp, url_prefix='/banners')
    user_api.register_blueprint(auth_bp, url_prefix='/auth')
    user_api.register_blueprint(social_bp, url_prefix='/social')

# 延迟注册蓝图
register_blueprints() 